package com.ants.project.core.cover;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;

/**
 * 解析配置文件里面的加密配置
 *
 * @author liushun
 * @version 1.0
 * @Date 2016-03-04
 */
public class EncryptPropertyConfigurer extends PropertyPlaceholderConfigurer {

    private final Logger logger = LoggerFactory.getLogger(PropertyPlaceholderConfigurer.class);

    /**
     * 重写配置文件 解析加密密文
     *
     * @param propertyName  属性名称
     * @param propertyValue 值名称
     * @return
     */
    protected String convertProperty(String propertyName, String propertyValue) {
        logger.debug("key=" + propertyName + " , value=" + propertyValue);
        return super.convertProperty(propertyName, propertyValue);
    }

}
